home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / IDL / Draft.idl < prev    next >
Encoding:
Text File  |  1994-04-19  |  4.6 KB  |  211 lines  |  [TEXT/MPS ]

  1. //# Copyright:    © 1993-94 by Apple Computer, Inc., all rights reserved.
  2. #ifndef _DRAFT_
  3. #define _DRAFT_
  4.  
  5. #ifndef _REFCTOBJ_
  6. #include "RefCtObj.idl"
  7. #endif
  8.  
  9. #ifndef _STORAGEU_
  10. #include "StorageU.idl"
  11. #endif
  12.  
  13. //==============================================================================
  14. // Constants
  15. //==============================================================================
  16.  
  17. enum ODDraftPermissionsConsts {
  18.     kDPNone,
  19.     kDPTransient,
  20.     kDPReadOnly,
  21.     kDPSharedWrite,
  22.     kDPExclusiveWrite
  23. };
  24. typedef ODULong ODDraftPermissions;
  25.  
  26. enum ODPurgePriorityConsts {
  27.     kInvisibleBlocks,
  28.     kAllBlocks,
  29.     kVisibleBlocks
  30. }; 
  31. typedef ODULong ODPurgePriority;
  32.  
  33. enum ODCloneKindConsts {
  34.     kODCloneCopy,
  35.     kODCloneCut,
  36.     kODClonePaste,
  37.     kODCloneDuplicate,
  38.     kODCloneDropCopy,
  39.     kODCloneDropMove,
  40.     kODCloneAll
  41. };
  42. typedef ODULong ODCloneKind;
  43.  
  44. //==============================================================================
  45. // Scalar Types
  46. //==============================================================================
  47. typedef    ODULong    ODVersionID;
  48. typedef    ODID    ODDraftID;
  49. typedef    ODID    ODLinkID;
  50. typedef    ODISOStr    ODDraftName;
  51.  
  52. //==============================================================================
  53. // Classes defined in this interface
  54. //==============================================================================
  55. interface  ODDraft;
  56.  
  57. //==============================================================================
  58. // Classes used by this interface
  59. //==============================================================================
  60. interface   ODDocument;
  61. interface   ODFrame;
  62. interface   ODLink;
  63. interface   ODLinkSource;
  64. interface   ODLinkSpec;
  65. interface   ODPart;
  66. interface   ODShape;
  67. // interface   ODStorageUnit;
  68.  
  69. //==============================================================================
  70. // ODDraft
  71. //==============================================================================
  72.  
  73. interface ODDraft :  ODRefCntObject
  74. {
  75.  
  76.     ODDocument   GetDocument();
  77.     
  78.     ODDraftID    GetID();
  79.     
  80.     ODDraftName  GetName();
  81.     
  82.     void      SetName(in ODDraftName name);
  83.     
  84.     ODStorageUnit   GetDraftProperties();
  85.     
  86.     ODDraftPermissions  GetPermissions();
  87.     
  88.     ODStorageUnit   CreateStorageUnit();
  89.     
  90.     ODStorageUnit   GetStorageUnit(in ODStorageUnitID id);
  91.     
  92.     void      RemoveStorageUnit(in ODStorageUnit storageUnit);
  93.     
  94.     ODDraftKey    BeginClone(in ODCloneKind kind);
  95.     
  96.     void      EndClone(in ODDraftKey key);
  97.     
  98.     void      AbortClone(in ODDraftKey key);
  99.     
  100.     ODBoolean    ChangedFromPrev();
  101.     
  102.     void      SetChangedFromPrev();
  103.     
  104.     void      RemoveFromDocument();
  105.     
  106.     ODDraft     RemoveChanges();
  107.     
  108.     ODDraft     Externalize();
  109.     
  110.     ODDraft     SaveToAPrevious(in ODDraft to);
  111.     
  112.     ODFrame CreateFrame(
  113.             in ODFrame    containingFrame,
  114.             in ODShape    frameShape,
  115.             in ODPart    part,
  116.             in ODTypeToken    viewType,
  117.             in ODTypeToken    presentation,
  118.             in ODULong    frameGroup,
  119.             in ODBoolean    isRoot,
  120.             in ODBoolean    isOverlaid);
  121.        
  122.     ODFrame GetFrame(in ODStorageUnitID id);
  123.     
  124.     void RemoveFrame(in ODFrame frame);
  125.     
  126.     ODPart CreatePart(in ODType partType,
  127.                         in ODEditor optionalEditor);
  128.     
  129.     ODPart GetPart(in ODStorageUnitID id);
  130.     
  131.     void RemovePart(in ODPart part);
  132.     
  133.     ODLinkSpec CreateLinkSpec (in ODPart part,
  134.                                 in ODPtr data,
  135.                                 in ODULong size);
  136.     
  137.     ODLinkSource CreateLinkSource(in ODPart part);
  138.     
  139.     ODLinkSource GetLinkSource(in ODStorageUnitID id);
  140.     
  141.     ODLink GetLink(in ODStorageUnitID id,
  142.                     in ODLinkSpec linkSpec);
  143.     
  144.     void        RemoveLink(in ODLink link);
  145.     
  146.     void        RemoveLinkSource(in ODLinkSource link);
  147.     
  148. // private by convention
  149.     
  150.     void InitDraft(in ODDocument document,
  151.                     in ODDraftID id,
  152.                     in ODDraftPermissions perms);
  153.     
  154.     void  ReleaseFrame(in ODFrame frame);
  155.     
  156.     void  ReleasePart(in ODPart part);
  157.     
  158.     void  ReleaseLink(in ODLink link);
  159.     
  160.     ODDraft ReleaseStorageUnit(in ODStorageUnitID id);
  161.     
  162. #ifdef __SOMIDL__
  163.   implementation
  164.   {
  165.     override:
  166.         somInit,
  167.         somUninit,
  168.         IncrementRefCount,
  169.         Release;
  170.     releaseorder:
  171.         GetDocument,
  172.         GetID,
  173.         GetName,
  174.         SetName,
  175.         GetDraftProperties,
  176.         GetPermissions,
  177.         CreateStorageUnit,
  178.         GetStorageUnit,
  179.         RemoveStorageUnit,
  180.         BeginClone,
  181.         EndClone,
  182.         AbortClone,
  183.         ChangedFromPrev,
  184.         SetChangedFromPrev,
  185.         RemoveFromDocument,
  186.         RemoveChanges,
  187.         Externalize,
  188.         SaveToAPrevious,
  189.         CreateFrame,
  190.         GetFrame,
  191.         RemoveFrame,
  192.         CreatePart,
  193.         GetPart,
  194.         RemovePart,
  195.         CreateLinkSpec,
  196.         CreateLinkSource,
  197.         GetLinkSource,
  198.         GetLink,
  199.         RemoveLink,
  200.         RemoveLinkSource,
  201.         InitDraft,
  202.         ReleaseFrame,
  203.         ReleasePart,
  204.         ReleaseLink,
  205.         ReleaseStorageUnit;
  206.   };
  207. #endif
  208. };
  209.  
  210. #endif  // _DRAFT_
  211.